#coding=utf-8

from __future__ import with_statement
from PyWapFetion import *

import os
import time
#import MySQLdb
import re
import os,sys
from time import sleep
import PyWapFetion
import traceback
import random 
import string
 
def editmsg():
    rd=str(random.sample([1,2,3,4,5,6,7,8,9,0], 6))
    print rd
    randomcode="".join(str(rd))
    msg=('尊敬的用户，您的登陆验证码为%s。') % randomcode
    print msg
    return msg

if '__main__' ==__name__:
    tel=sys.argv[1]
    rdcode=sys.argv[2]
    style=sys.argv[3]
    #user = '18766313839'
    #password = 'fy5121919910804'
    user ='15163155853'
    password='wangliang890515'
    if style=="reset":
        msg=(('尊敬的用户，您的密码重置为为%s。') % rdcode)
    else:
        msg=('尊敬的用户，您的登陆验证码为%s。') % rdcode
    myfetion = send(user,password,tel,msg)


    

